package com.xyz.dao.logic;

import com.free.ext.mybatis.model.entity.PageResponseModel;
import com.xyz.dao.dao.SLotteryBetinfoDao;
import com.xyz.domain.table.SLotteryBetinfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class SLotteryBetinfoLogic {

    @Autowired
    private SLotteryBetinfoDao sLotteryBetinfoDao;

    public SLotteryBetinfo add(SLotteryBetinfo sLotteryBetinfo){
        return sLotteryBetinfoDao.insert(sLotteryBetinfo);
    }

    public Integer update(SLotteryBetinfo sLotteryBetinfo){
        return sLotteryBetinfoDao.update(sLotteryBetinfo);
    }

    public List<SLotteryBetinfo> list(SLotteryBetinfo sLotteryBetinfo, String orderBy){
        return sLotteryBetinfoDao.selectList(sLotteryBetinfo, orderBy);
    }

    public Integer delete(Integer key){
        return sLotteryBetinfoDao.delete(key);
    }

    public PageResponseModel<SLotteryBetinfo> pageInfo(SLotteryBetinfo sLotteryBetinfo, String orderBy, Integer pageNo, Integer pageSize){
        return sLotteryBetinfoDao.selectByPageNo(sLotteryBetinfo, orderBy, pageNo, pageSize);
    }

}